﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="MenuEdit.ascx.cs" Inherits="controls_admin_CategoryEdit" %>
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5>
            Cập nhật Menu
        </h5>
        <div class="search">
            <div class="input">
            </div>
            <div class="button">
            </div>
        </div>
    </div>
    <!-- end box / title -->
    <div id="divMessage" runat="server" />
    <div class="form" style="height: auto; padding-bottom: 40px;">
        <div class="fields" style="left: 230px; margin: 0; padding: 0 0 8px 0; width: auto;
            position: relative;">
            <div class="field">
                <div class="label" style="left: 20px;">
                    <label for="input-small">
                        Danh mục cha:</label>
                </div>
                <div class="input" style="margin-left: 170px">
                    <asp:DropDownList ID="ddlParentMenu" runat="server" CssClass="select" AppendDataBoundItems="true">
                    </asp:DropDownList>
                    <div class="note" id="NOTE_PARENT" runat="server" />
                </div>
            </div>
            <div class="field">
                <div class="label" style="left: 20px;">
                    <label for="input-small">
                        Tên Module:</label>
                </div>
                <div class="input" style="margin-left: 170px">
                    <asp:TextBox ID="txtMenuName" runat="server" Width="180px" CssClass="cateName" />
                    <div class="note" id="NOTE_NAME" runat="server" />
                </div>
            </div>
            <div class="field">
                <div class="label" style="left: 20px;">
                    <label for="input-small">
                        Tên hiển thị:</label>
                </div>
                <div class="input" style="margin-left: 170px">
                    <asp:TextBox ID="txtDesc" runat="server" Width="180px" CssClass="description" />
                    <div class="note" id="NOTE_TITLE" runat="server" />
                </div>
            </div>
            <div class="field">
                <div class="label" style="left: 20px;">
                    <label for="file">
                        Icon:</label>
                </div>
                <div class="input input-file" style="margin-left: 170px">
                    <asp:FileUpload ID="fulTHUMB_ICON" runat="server" /><br />
                    <div id="imgthumb" runat="server" />
                    <div class="note" id="NOTE_ICON" runat="server" />
                </div>
            </div>
            <div class="field">
                <div class="label" style="left: 20px;">
                    <label for="input-small">
                        Thứ tự hiển thị:</label>
                </div>
                <div class="input" style="margin-left: 170px">
                    <asp:TextBox ID="txtShortDisplay" runat="server" Width="180px" CssClass="number"
                        Text="1" />
                    <div class="note" id="NOTE_SORT" runat="server" />
                </div>
            </div>
            <div class="field">
                <div class="label" style="left: 20px;">
                    <label>
                        Hiển thị:</label>
                </div>
                <div class="input" style="margin-left: 170px">
                    <asp:CheckBox ID="cboDisOnHome" runat="server" />
                    <div class="note" id="NOTE_DISPLAY" runat="server" />
                </div>
            </div>
            <div class="buttons">
                <input type="reset" name="reset" value="Làm lại" />
                <asp:Button ID="btnSubmit" runat="server" Text="Cập nhật" Width="100px" OnClick="btnSubmit_Click" />
            </div>
        </div>
    </div>
    <div style="text-align: center; margin: 10px">
        <%if (Session["url"] != null)
          {
              if (Request.UrlReferrer != null)
              {
                  if (!Request.UrlReferrer.ToString().Equals(Request.Url.ToString()))
                  {
                      Session["url"] = Request.UrlReferrer.ToString();                      
                  
        %>
        <a onclick="history.go(-1);" title="Trang trước">
            <%
}
                  else
                  {
            %>
            <a href='<%=Session["url"].ToString() %>' title="Trang trước">
                <%   
}
              }
              else
              {                      
                %>
                <a onclick="history.go(-1);" title="Trang trước">
                    <%}
          }
          else
          {
              if (Request.UrlReferrer != null)
                  Session.Add("url", Request.UrlReferrer.ToString());
              else
                  Session.Add("url", Request.Url.ToString());
                    %>
                    <a href="default.aspx" title="Trang trước">
                        <%} %>
                        <img src="../resources/images/icons/16x16/arrow-return.png" alt="Trang trước" /></a>
                    &nbsp;&nbsp; <a href="default.aspx" title="Trang chủ">
                        <img src="../resources/images/icons/16x16/home.png" alt="Trang chủ" /></a>
    </div>
</div>
